import React from "react";
import { ConfigProvider } from "antd";
import ReactDOM from "react-dom/client";
import App from "./App.tsx";
import store from "./store/index.ts";
import { RouterProvider } from "react-router-dom";
import { Provider } from "react-redux";
import "./index.css";
import "./reset.css";
import "./keyframes.css";
import "bytemd/dist/index.css";
import "/src/assets/css/variables.less";
import routers from "./router/index.tsx";
import zhCN from "antd/locale/zh_CN";
import locale from "antd/locale/zh_CN";
import dayjs from "dayjs";
import "dayjs/locale/zh-cn";
dayjs.locale("zh-cn");
// 处理 Uncaught ReferenceError: global is not defined 的问题
if (window.global === undefined) {
  window.global = window;
}

ReactDOM.createRoot(document.getElementById("root")!).render(
  <Provider store={store}>
    {/* <BrowserRouter> */}
    {/* <React.StrictMode> */}
    <ConfigProvider locale={zhCN}>
      <RouterProvider router={routers} />
    </ConfigProvider>
    {/* </React.StrictMode> */}
    {/* </BrowserRouter> */}
  </Provider>
);
